package org.springblade.third.exception;

import org.springblade.third.enums.ThirdErrorCode;

public class ThirdException extends RuntimeException {

    private final String code;

    public ThirdException(ThirdErrorCode error) {
        super(error.getMessage());
        this.code = error.getCode();
    }

    public ThirdException(ThirdErrorCode error, String detailMessage) {
        super(detailMessage);
        this.code = error.getCode();
    }

    public String getCode() {
        return code;
    }
}



